<template>
  <div id="app">
    <div v-if="invalidRoute" class="page404">
      <el-image :src="image"></el-image>
    </div>
    <router-view v-else/>
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      image: require("./assets/404.png")
    }
  },
  computed: {
    invalidRoute() {
      return !this.$route.matched || this.$route.matched.length === 0;
    }
  }
}
</script>

<style>
#app {
  height: 100%
}

body {
  height: 100%;
  margin: 0;
}

html {
  height: 100%;
  user-select: none;
}

.page404 {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
